<?php
	header('Content-Type:text/html;Charset=utf-8');
	header("Access-Control-Allow-Origin:*");
	header("Access-Control-Allow-Methods:GET,POST");

	$signName=$_REQUEST['txtSignName'];
	$signPwd=$_REQUEST['txtSignPwd'];
	$signMail=$_REQUEST['txtSignMail'];

	$conn=mysqli_connect("127.0.0.1","root","root","process");
	$query_str="INSERT INTO user VALUES (default,'$signName','$signPwd','$signMail')";
	$result=mysqli_query($conn,$query_str);
	$result_count=mysqli_affected_rows($conn);
	if($result_count>0){
		$uid=mysqli_insert_id($conn);
		$json_array=array("uid"=>$uid,"username"=>$signName);
		echo json_encode($json_array);
	}else{
		echo "ERROR";
	}
?>